//
//  DYJingquYoulanSubCell.swift
//  SheYangBigData
//
//  Created by 宋海胜 on 2021/1/4.
//  Copyright © 2021 叁拾叁. All rights reserved.
//

import UIKit

class DYJingquYoulanSubCell: SYBaseCollectionViewCell {
    
    let wenLb: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x1E1E1E)
        v.font = 15.autoFontSize()
        return v
    }()
    
    let pic: UIImageView = {
        let v: UIImageView = UIImageView()
        v.layer.cornerRadius = 6
        v.layer.masksToBounds = true
        return v
    }()
    

    public func configureView(_ model: DYTourScenicVisitsModel) {
        wenLb.text = model.name
        pic.sy_setWithUrl(model.imrUrl)
    }
    
    public func configure(_ model: DYJQYoulanListModel) {
        wenLb.text = model.name
        pic.sy_setWithUrl(model.imrUrl)
    }
    
    public func configure(_ model: DYCateListModel) {
        wenLb.text = model.name
        pic.sy_setWithUrl(model.imgUrl)
    }
    
    
    
    override func initViews() {
        
        addSubview(wenLb)
        addSubview(pic)
        wenLb.snp.makeConstraints { (make) in
            make.top.equalTo(pic.snp.bottom).offset(9.5.autoWidth())
            make.left.equalTo(pic.snp.left)
            make.right.equalTo(pic)
            make.height.equalTo(14.5.autoWidth())
            make.bottom.equalToSuperview()
        }
        pic.snp.makeConstraints { (make) in
            make.top.equalToSuperview()
            make.left.equalToSuperview().offset(15.0.autoWidth())
            make.right.equalToSuperview()
            make.height.equalTo(100.0.autoWidth())
            make.width.equalTo(130.0.autoWidth())
        }
    }
}

